#ifndef CAR_H
/**
 * initial different car because we have 2 cars
 */

struct Car
{
    unsigned short   version;
    unsigned char   path[20];
    void            (*strjoint)(unsigned char * filepath);
    void            (*set_parameter)();
    void            (*save)();
};

struct Car_Para
{
    unsigned short stop_value;
    float          brake_midvalue0;
	float          brake_midvalue1;
    unsigned short brake_limit;
    float          brake_ratio;

    unsigned short steer_midvalue;
    unsigned short steer_limit[2];
    float          steer_ratio;

    unsigned short gpsteer_midvalue0;
	unsigned short gpsteer_midvalue1;
    unsigned short gpsteer_limit[2];
    float          gpsteer_ratio;

    unsigned short stopsteer_midvalue0;
	unsigned short stopsteer_midvalue1;
    unsigned short stopsteer_limit[2];
    
	unsigned char  direction;
	
	float		   r_start_x;
	float		   r_start_y;
	float		   r_start_angle;
	float		   l_start_x;
	float		   l_start_y;
	float		   l_start_angle;
		
	float		   end_to_CenterOfRearwheel;
	
    unsigned short camera_center;
	
    float          car_len;
    float          led_dis;
	
	float		   gyro_float;
    float          gyro_convert1;
    float          gyro_convert2;
    float          encoder1_eff;
    float          encoder2_eff;

    unsigned short ledboard_status;
    unsigned short camera_status;
	float          offset_y;


};


/*
  global
 */
extern struct Car car;
extern struct Car_Para car_para[];

#define CAR_H
#endif
